home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-08-17 | 1.7 KB | 53 lines | [TEXT/MMCC] |
- // ===========================================================================
- // CCustomListBox.h ©1994 Jan Bruyndonckx All rights reserved.
- // v1.0 18/6/94
- //
- // A listbox subclass containing custom data.
- // The default listbox contains only string data.
- // ===========================================================================
-
- #pragma once
-
- #include <LListBox.h>
-
- //----------------------------------------------------------------------------
-
- class CCustomListBox : public LListBox {
-
- public:
- enum {
- classID = 'clst'
- } ;
-
- static CCustomListBox* CreateFromStream(LStream *inStream);
-
- CCustomListBox() ;
- CCustomListBox(const SPaneInfo &inPaneInfo,
- Boolean inHasHorizScroll, Boolean inHasVertScroll,
- Boolean inHasGrow, Boolean inHasFocusBox,
- MessageT inDoubleClickMessage, Int16 inTextTraitsID,
- LCommander *inSuper);
- CCustomListBox(LStream *inStream);
-
- virtual void *GetSelection(void *outDescriptor, short *outDescLen) const;
- virtual void SetSelection(const void *inDescriptor, const short inDescLen);
-
- virtual void *GetCellPtr (const Cell cell) ;
-
- protected:
- virtual void DrawElement (const short lMessage, const Boolean lSelect, const Rect *lRect,
- const void *lElement, const short lDataLen) ;
- virtual void DrawElementSelf (const Rect *lRect, const void *lElement, const short lDataLen) ;
-
- private:
-
- void init (void) ;
- friend pascal void LDefProc (short lMessage, Boolean lSelect, Rect *lRect,
- Cell lCell, unsigned short lDataOffset, unsigned short lDataLen, ListHandle lHandle) ;
-
- static ListDefUPP callerLDEFUPP ;
-
- enum {
- callerLDEFResID = 1100
- } ;
- } ;